﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using Dtf.Core.Remoting;

namespace Dtf.Core
{
    
    [Serializable]
    public class DtfException : Exception
    {
        public DtfException(string message)
            : base(message)
        {

        }



        protected DtfException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
        }

        public DtfException(string message, Exception innerException)
            : base(message, innerException)
        {
        }
    }


    [Serializable]
    public class UINotFoundExecption : DtfException
    {
        public UINotFoundExecption()
            : base("UI Not Found!")
        {
        }

        public UINotFoundExecption(string message)
            : base(message)
        {
        }

        protected UINotFoundExecption(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
        }

        public UINotFoundExecption(string message, Exception innerException)
            : base(message, innerException)
        {
        }
    }

    [Serializable]
    public class UINInValidExecption : DtfException
    {
        public UINInValidExecption()
            : base("The UI is invalid now!")
        {
        }

        public UINInValidExecption(string message)
            : base(message)
        {
        }

        protected UINInValidExecption(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
        }

        public UINInValidExecption(string message, Exception innerException)
            : base(message, innerException)
        {
        }
    }

    [Serializable]
    public class FilterExecption : DtfException
    {
        public FilterExecption()
            : base("Query string is error!")
        {
        }

        public FilterExecption(string message)
            : base(message)
        {
        }

        protected FilterExecption(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
        }

        public FilterExecption(string message, Exception innerException)
            : base(message, innerException)
        {
        }
    }

    [Serializable]
    public class ResourceKeyException : DtfException
    {
        public ResourceKeyException()
            : base("Format of resource id is incorrect!")
        {
        }

        public ResourceKeyException(string message)
            : base(message)
        {
        }

        protected ResourceKeyException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
        }

        public ResourceKeyException(string message, Exception innerException)
            : base(message, innerException)
        {
        }
    }

}
